package form;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Vector;

import trangchu.UtilDelegate;

public class DSJ_NhapHang {
	public String NhapHang_ID;
	public String HangHoa_ID;
	public String TenHangHoa;
	public String KhoHang;
	public String TenDonVi;
	public String DonGia;
	public String SoLuong;
	public String ThanhTien;
	public String NhanVienNH;
	public String NgayNhapHang;
	public String NhaPhanPhoi_ID;
	public String TenNPP;
	public String CachThanhToan;
	public String HanThanToan;
	public String getNhapHang_ID() {
		return NhapHang_ID;
	}
	public void setNhapHang_ID(String nhapHang_ID) {
		NhapHang_ID = nhapHang_ID;
	}
	public String getHangHoa_ID() {
		return HangHoa_ID;
	}
	public void setHangHoa_ID(String hangHoa_ID) {
		HangHoa_ID = hangHoa_ID;
	}
	public String getTenHangHoa() {
		return TenHangHoa;
	}
	public void setTenHangHoa(String tenHangHoa) {
		TenHangHoa = tenHangHoa;
	}
	public String getKhoHang() {
		return KhoHang;
	}
	public void setKhoHang(String khoHang) {
		KhoHang = khoHang;
	}
	public String getTenDonVi() {
		return TenDonVi;
	}
	public void setTenDonVi(String tenDonVi) {
		TenDonVi = tenDonVi;
	}
	public String getDonGia() {
		return DonGia;
	}
	public void setDonGia(String donGia) {
		DonGia = donGia;
	}
	public String getSoLuong() {
		return SoLuong;
	}
	public void setSoLuong(String soLuong) {
		SoLuong = soLuong;
	}
	public String getThanhTien() {
		return ThanhTien;
	}
	public void setThanhTien(String thanhTien) {
		ThanhTien = thanhTien;
	}
	public String getNhanVienNH() {
		return NhanVienNH;
	}
	public void setNhanVienNH(String nhanVienNH) {
		NhanVienNH = nhanVienNH;
	}
	public String getNgayNhapHang() {
		return NgayNhapHang;
	}
	public void setNgayNhapHang(String ngayNhapHang) {
		NgayNhapHang = ngayNhapHang;
	}
	public String getNhaPhanPhoi_ID() {
		return NhaPhanPhoi_ID;
	}
	public void setNhaPhanPhoi_ID(String nhaPhanPhoi_ID) {
		NhaPhanPhoi_ID = nhaPhanPhoi_ID;
	}
	public String getTenNPP() {
		return TenNPP;
	}
	public void setTenNPP(String tenNPP) {
		TenNPP = tenNPP;
	}
	public String getCachThanhToan() {
		return CachThanhToan;
	}
	public void setCachThanhToan(String cachThanhToan) {
		CachThanhToan = cachThanhToan;
	}
	public String getHanThanToan() {
		return HanThanToan;
	}
	public void setHanThanToan(String hanThanToan) {
		HanThanToan = hanThanToan;
	}
	
	public Vector getUsers(){
		Vector list = new Vector();
		Connection con =UtilDelegate.getConnection();		
		PreparedStatement st;
		try {
			st = con.prepareStatement("SELECT * FROM NhapHang");
			ResultSet rs = st.executeQuery();
			while(rs.next()){
				Vector<String> b = new Vector<String>();
				b.add(rs.getString("HangHoa_ID"));
				b.add(rs.getString("TenHangHoa"));
				b.add(rs.getString("KhoHang"));
				b.add(rs.getString("TenDonVi"));
				b.add(rs.getString("DonGia"));
				b.add(rs.getString("SoLuong"));
				b.add(rs.getString("ThanhTien"));
				b.add(rs.getString("NhapHang_ID"));
				list.add(b);
			}
		} catch (SQLException e) {
			
			e.printStackTrace();
		}
		
		return list;
	}
	
}
